<template>
	<view  class="container">
		<view style="background:#f5f5f5">
		<image :src="godImg" mode="aspectFill" style="width:100%;display: block;margin:0rpx auto" @click="openBigImg"></image>
		<view class="spxq">
			<view style="font-size:1.2rem">￥{{goodsInfo.dprice}}</view>
		<!-- 	<view style="flex:1;text-align:right;padding-right:20rpx">
				<text style="font-size: 0.8rem;">已售{{goods.dishsum}}份</text>
				<text style="font-size: 0.8rem;margin-left:1rem">{{goods.sorce}}分</text>
			</view> -->
		</view>
		<view style="display:flex;padding:20rpx;background:#ffffff">
		  <view style="flex:2">
			<view style="font-size:1.2rem;font-weight:bold;margin:10rpx 0rpx">{{goodsInfo.dname}}</view>
		   <view @click="goStore(goodsInfo.shopId)">
			  <text decode class="shopss" v-if="goodsInfo.restUserShop">{{goodsInfo.restUserShop.shopName}}</text>
			</view>
		  </view>
		  <view style="flex:1;text-align:right;height: 120rpx;line-height: 120rpx;">
		  <!-- <van-stepper value="{{buynum}}" integer bind:change="onChange" min="1" max="20" theme="round"/> -->
		  </view>       
		</view>
		<!-- <view class="dpdz">{{goodsInfo.restUserShop.shopAdd}}</view> -->
		<!-- <c-active :mid="goods.mid" :rcode="goods.rcode"></c-active> 
		  <text style="font-weight: bold;font-size:1rem;">商品介绍：</text>{{goodsInfo.dishdesc}}-->
	   
		<!-- <c-evaluate :evaluateData="goodsInfo.commsg"></c-evaluate> -->
		<view style="width:100%;height:60upx;line-height:60upx;background: #f5f5f5;padding-left:10upx">用户评价：</view>
		<view style="padding:20upx;background:#ffffff;">
			    <view v-for="(item, index) in pldata" :key="index">
					<view style="margin-top:20upx">{{item.commentContent}}</view>
					<view style="display:flex;justify-content: space-between;margin-top:10upx;">
						<view>{{item.createBy}}</view>
						<view>{{item.createTime}}</view>
					</view>
				 </view>
			</u-list>
		</view>
	  </view>
	  <!-- 商品SKU弹窗 -->
	  <!-- <SkuPopup v-if="!isLoading" v-model="showSkuPopup" :skuMode="skuMode" :goods="goods" @addCart="onAddCart" /> -->
	  <!-- 底部选项卡 -->
	  <view class="footer-fixed">
		<view class="footer-container">
		  <!-- 导航图标 -->
		  <view class="foo-item-fast">
			<!-- 首页 -->
			<view >
			  <image src="../../../static/images/bcart.png" style="width:70upx;height:70upx;" @click="goCarts"/>
			</view>
			<view style="margin-left:20upx;">
				<u-icon v-if="iscollect==1" name="star-fill" color="#FF0000" size="40" @click="ongoLike"/>
				<u-icon v-else name="star" color="#000000"  size="40" @click="goLike"/>
			</view>
		  </view>
		  <!-- 操作按钮 -->
		  <view class="foo-item-btn">
			<view class="btn-wrapper">
			  <view class="btn-item btn-item-deputy" v-if="goodsInfo.pickupFlag==0" @click="onShowSkuPopup(0)">
				<text>加入购物车</text>
			  </view>
			  <view class="btn-item btn-item-main" @click="onShowSkuPopup(1)">
				<text>立即购买</text>
			  </view>
			</view>
		  </view>
		</view>
	  </view>
  
	  <!-- 快捷导航 -->
	  <!-- <shortcut bottom="120rpx" /> -->
	  <u-popup :show="showSkuPopup" :round="true" mode="bottom" borderRadius="12">
		  <view style="text-align: center;margin-top:20upx;">
			  实付金额
		  </view>
		  <view style="text-align: center;font-size:1.2rem">￥{{sumMony}}</view>
		  <view style="margin:10px 0px">选择支付方式:</view>
		  <view>
			  <radio-group @change="radioChangexcx">
				  <label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in payWayxcx" :key="item.value">
					  <view style="display:flex;justify-items: center;">
						  <img :src="item.imgurl" style="width:60upx;height:60upx"/>
						  <view style="line-height:60upx;height:60upx;padding-left:5px">{{item.label}}</view>
					  </view>
					  <view>
						  <radio :value="item.value" :checked="item.state" />
					  </view>
				  </label>
			  </radio-group>					
		  </view>
		  <view style="padding:20upx" v-if="specData.length>0">
			  <view>{{goodsInfo.dname}}</view>
			  <view v-for="(item,index) in specData" style="display:flex;margin-top:20upx">
				  <view>{{item.speType}}:</view>
				  <view v-for="(it,idx) in item.detail" style="display:flex;padding-left:10upx;">
					  <u-button :color="`${it.speId == item.checkVal?'#f9ae3d':'#666'}`" size="mini" :text="it.speTypeItem+it.spePrice" style="padding-left:10upx;color:#000000" @click="choseSpec(idx,it.speId)"></u-button>
				  </view>
			  </view>
			  <view style="margin-top:20upx">已选规格：{{checkSpec}}</view>
		  </view>
		  <view v-if="dotype">
			  <view class="gmsl"><view>购买数量：</view><u-number-box v-model="buyNum" @change="valChange"></u-number-box></view>
			   <sl-filter-view @confirm="getMome"></sl-filter-view>
			   <u--textarea v-model="memo" placeholder="请输入口味偏好等要求" count ></u--textarea>
		  </view>
		   <view style="margin:20rpx;display: flex;">
			 <u-button @click="onClose" size="small" style="flex:1;text-align: right;">取消</u-button>
			 <u-button @click="goCreateOrder" color="#F66B71" size="small" style="margin-left:20rpx;flex:1;text-align: right;">确定</u-button>
		   </view>
	  </u-popup>
	  <u-popup :show="showPay" mode="bottom" :round="10" @close="closePay">
		  <view style="padding:10px;">
			  <view style="text-align: center;">
				  实付金额
			  </view>
			  <view style="text-align: center;font-size:1.2rem">￥6</view>
			  <view style="margin:10px 0px">选择支付方式:</view>
			  <view>
				  <radio-group @change="radioChange">
					  <label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in payWay" :key="item.value">
						  <view style="display:flex;justify-items: center;">
							  <img :src="item.imgurl" style="width:60upx;height:60upx"/>
							  <view style="line-height:60upx;height:60upx;padding-left:5px">{{item.label}}</view>
						  </view>
						  <view>
							  <radio :value="item.value" :checked="item.state" />
						  </view>
					  </label>
				  </radio-group>
				  <u-button type="primary" size="large" @click="goPay">立即支付</u-button>
			  </view>
		  </view>
	  </u-popup>
	  <u-popup :show="ggpopup" :round="10" mode="center" closeOnClickOverlay  @open="openTset" @close="ggpopup = false">
		  
	  </u-popup>
	  <u-modal :show="showSuccess" :closeOnClickOverlay="true" :title="title" :content='content' @confirm="closeModel"></u-modal>
	</view>
  </template>
  
  <script>
	 import Config from '@/util/index.js'
	 import {
	  queryGoodsOne
	 } from '@/api/goods'
	 import {
	  cancelCollect,saveCollect
	 } from '@/api/collect'
	 import {
	  getwxOpenId
	 } from '@/api/user'
	 import {
	  saveCart,cartListOdr,redayPay,redayxcxPay,cardxcxPay
	 } from '@/api/cart'
	 import {
	  evaluteList
	 } from '@/api/order'
	import slFilterView from '../../../components/sl-filter/filter-view.vue';
	// import cActive from '../../../components/active.vue';
	export default {
	  components: {
		  slFilterView,
		  // cActive,
	  },
	  computed: {},
	  data() {
		return {
		  // 正在加载
		  isLoading: true,
		  ggpopup:false,
		  showPay:false,
		  // 当前商品ID
		  goodsId: null,
		  sumMony:0,
		  payWay:[
			  {
				imgurl:require("../../../static/images/wxlog.jpeg"),
				value:'0',
				label:'微信支付',
				state:true
			  },
			  {
				imgurl:require("../../../static/images/zfblog.png"),
				value:'1',
				label:'支付宝支付',
				state:false
			  }
		  ],
		  // 商品详情
		  goods: {},
		  title:'',
		  content:'',
		  total:0,
		  showSuccess:false,
		  // 购物车总数量
		  cartTotal: 0,
		  // 显示/隐藏SKU弹窗
		  showSkuPopup: false,
		  // 模式 1:都显示 2:只显示购物车 3:只显示立即购买
		  skuMode: 1,
		  yqdes:'',
		  memo:'',
		  seleMemo:'',
		  themeColor: '#000000',
		  titleColor: '#666666',
		  independence:true,
		  actives:[],
		  goodsInfo:{},
		  buyNum:1,
		  godImg:'',
		  addSpcPric:0,
		  amount:0,
		  pageNum:1,
		  pageSize:10,
		  showkw:false,
		  coll_params:{
			  collectid:"",
			  loginid:"",
			  collobjid:"",
			  isflag:"0"
		  },
		  dotype:false,
		  cartnum:0,
		  noData:false,
		  specialId: '',
		  query: ['口味',''], 
		  memoList:['','微辣','少盐','不要辣椒','不要香菜'],
		  userId:'',
		  iscollect:0,
		  dishesId:'',
		  uploadFilePath: "", 
		  wname:'',
		  scode:'',
		  rcode:'',
		  moreData:false,
		  payWaytype:0,
		  orderId:'',
		  checkSpec:'',
		  specData:[],
		  payWayxcx:[
			  {
				imgurl:"../../../static/images/wxlog.jpeg",
				value:'0',
				label:'微信支付',
				state:true
			  },
			  {
				imgurl:"../../../static/images/cardlog.png",
				value:'1',
				label:'卡支付',
				state:false
			  }
		  ],
		  pldata:[],
		  checkData:[],
		  checkIdData:[],
		  detailImg:false,
		  noActive:false,
		  pageName:-1
		}
	  },
	  onShow(){
		  this.userId = uni.getStorageSync("userId")
	  },
	  /**
	   * 生命周期函数--监听页面加载
	   */
	  onLoad(options) {
		// 记录商品ID
		this.dishesId = options.gid
		 console.log("onRefreshPage",this.dishesId)
		this.onRefreshPage()
		 this.getEvalateList()
		this.uploadFilePath = Config.get('apiUrl')
		let _this = this
		uni.getStorage({
			key: 'deptdas',
			success: function (res) {
				let depts = JSON.parse(res.data)
				_this.scode = depts.scode
				_this.rcode = depts.rcode			
			}
		})
	  },
	  onReachBottom(){
		  if(this.moreData){
			  this.pageNum++
			  this.getEvalateList()
		  }
	  },
	  created() {
		  console.log("onRefreshPage2",this.dishesId)
		 
	  },
	  methods: {
		  closeModel(){
			  this.showSuccess=false
		  },
		  radioChangexcx(val){
			  this.payWaytype = val.detail.value
		  },
		  goCarts(){
			  uni.reLaunch({
				  url:'../cart/index'
			  })
		  },
		  closePay(){
			  this.showPay = false
		  },
		  radioChange(val){
			  console.log(val)
		  },
		  getEvalateList(){
		  	let params = {
				pageNum:this.pageNum,
				pageSize:this.pageSize,
		  		dishesId:this.dishesId
		  	}
		  	evaluteList(params).catch(res=> {
				if(res.data.code==200){
					this.total = res.data.total
					if(res.data.rows.length>0){
						let preDat = res.data.rows
						if(this.pldata.length<this.total){
							this.moreData = true
							this.pldata = [...this.pldata,...preDat]
							if(preDat.length<this.pageSize){
								this.moreData = false
							}
						}else{
							this.moreData = false
						}
					}else{
						this.moreData = false
					}
				}
		  	})
		  },
		  scrolltolower(){
			  // console.log("xxsss",this.pageNum)
			  // this.pageNum ++ 
			  // this.getEvalateList()
		  },
		  choseSpec(cid,id){
			  	let math = require('mathjs');
				let spctotal = 0
			  this.specData.forEach((item,idx)=>{
				  item.detail.forEach(it=>{			
					  if(id == it.speId){
						  item.checkVal = id
						  this.checkData[idx] = it.speTypeItem
						  this.checkIdData[idx] = it.speId
						  spctotal = math.add(spctotal,it.spePrice)
					  }
				  })
			  })
			  this.addSpcPric = spctotal
			  let gosprice = math.add(this.goodsInfo.dprice,spctotal)
			  this.sumMony = math.multiply(gosprice,this.buyNum)
			  this.checkSpec = this.checkData.toString()
		  },
		  goStore(shopId){
			  uni.navigateTo({
				  url: '../shop/index?mid='+shopId
			  })
		  },
		  openTset(){},
		  goLike(){
			  let params = {
				  ocartId:"",
				  userId:this.userId,
				  shopId:this.goodsInfo.shopId,
				  dishesId:this.goodsInfo.dishesId,
				  dprice:this.goodsInfo.dprice,
				  buyNum:1,
				  deptId:this.rcode,
				  // speIds:_this.rowData.restShopDisheSpecs.length==0?"":_this.checkIdData.toString(),
				  isFlag:1
			  }
			  if(this.goodsInfo.dprice){
				  saveCollect(params).catch(resp => {
					  if(resp.data.code == 200){
						  uni.showToast({
							  title:"收藏成功",
							  icon: 'none',
							  duration: 2000
						  });
					  }
					  this.onRefreshPage()
				  })
			  }else{
				  uni.showToast({
					  title:"该商品未定价，不能收藏",
					  icon: 'none',
					  duration: 2000
				  });
			  }
		  },
		  ongoLike(){
			  let params = {
				  dishesId:this.goodsInfo.dishesId,
				  loginid:this.userId
			  }
			  let _this = this
			  cancelCollect(params).catch(res=> {
				  console.log("res111",res)
				  if(res.data.code == 200){
					  _this.iscollect=0
					uni.showToast({
						title:"取消收藏成功",
						icon: 'none',
						duration: 2000
					});
				  }
				  this.onRefreshPage()
			  })
		  },
		  openBigImg(){},
		  onChangearea(){},
		  onClose(){
			  this.buyNum = 1
			  this.sumMony = 0
			  this.addSpcPric = 0
			  this.showSkuPopup=false
		  },
		  goPay(){
			  let _this = this
			  // #ifdef H5
			  // h5端
				  let paramsx = {
					  orderId:this.orderId
				  }
				  redayPay(paramsx).catch(resp=>{
					  console.log("xxssdd",resp)
					  window.location.href = resp.data
				  })
			  // #endif
			  
			  // #ifdef APP-PLUS
			  // app端
				  let parms = {
					  orderId:this.orderId
				  }
				  redayPay(parms).catch(resp=>{
					  console.log("xxssdd",resp)
					  window.location.href = resp.data
				  })
			  // #endif
			  
			  // #ifdef MP-WEIXIN
				  let params = {
					  orderNumber:this.orderId,
					  // openId:resp.data.openid
				  }
				  redayxcxPay(params).catch(resp=>{
						//调用微信官方支付接口弹出付款界面,输入密码扣款
					  wx.requestPayment({
						   timeStamp:resp.data.timeStamp,  //时间戳
						   nonceStr:resp.data.nonceStr,   //随机字符串
						   package:resp.data.package,    //prepay_id
						   signType:resp.data.signType,   //签名算法MD5
						   paySign:resp.data.paySign,    //签名
						   success (res) {
							 if (res.errMsg == "requestPayment:ok"){
								console.log('支付成功', res)
								_this.showPay = false
								uni.navigateTo({
									 url:'../my/order/index'
								})
							 }else{
								console.log('支付失败')
							 }
						   },
						   fail (res) { 
							 console.log('支付失败', res)
						   }
					  })
				  })
			  // #endif
		  },
		  getMome(res){
			  let result = res.result.jobType
			  this.seleMemo=""
			  if(result.length>0){
				  result.map(item =>{
					  this.seleMemo+=this.memoList[item]+','
				  })
			  }
		  },
		  doSubmit(){},
		  filterResult(){},
		  valChange(e) {
			  let num = e.value
			  this.buyNum = e.value
			  let math = require('mathjs');
			  if(this.checkSpec){
				  let gprice = math.add(this.addSpcPric,this.goodsInfo.dprice)
				  this.sumMony = math.multiply(num,gprice)
			  }else{
				  this.sumMony = math.multiply(num,this.goodsInfo.dprice)
			  }
		  },
		  goCreateOrder(){
			  if(!this.dotype){
				  //添加购物车
				  let params = {
					  ocartId:"",
					  deptId:this.rcode,
					  userId:this.userId,
					  shopId:this.goodsInfo.shopId,
					  dishesId:this.goodsInfo.dishesId,
					  dprice:this.goodsInfo.dprice,
					  buyNum:this.buyNum,
					  pickupFlag:0,
					  memo:this.seleMemo+this.memo,
					  speName:this.goodsInfo.restShopDisheSpecs?this.checkSpec:"",
					  speIds:this.goodsInfo.restShopDisheSpecs?this.checkIdData.join(','):"",
					  isflag:1
				  }
				  console.log("1231",params)
				  if(this.goodsInfo.dprice){
					  saveCart(params).catch(resp => {
						  if(resp.data.code == 200){
							  uni.showToast({
							  title:"加入购物车成功",
							  icon: 'none',
							  duration: 2000
							  });
							  this.showSkuPopup = false
						  }
					  })
				  }else{
					  uni.showToast({
						  title:"该商品未定价，不能售卖",
						  icon: 'none',
						  duration: 2000
					  });
				  }
			  }else{
				  let params = {
					  orderId:"",
					  userId:this.userId,
					  ostate:0,
					  lstate:'0',								
					  shopId:this.goodsInfo.shopId,
					  endTime:'',
					  paymoney:0,//实付金额
					  originalPrice:this.goodsInfo.dprice,//原价
					  ltime:"",
					  pickupFlag:1,
					  disheorderOrderitems:[{
						  itemId:'',
						  ordId:'',
						  dishesId:this.goodsInfo.dishesId,
						  speId:"",
						  speName:'',
						  buyNum:this.buyNum,
						  memo:this.seleMemo+this.memo,
						  idisPrice:this.goodsInfo.dprice,//基础价格
						  addPrice:'',//规格加价
						  ipayNum:0,//实付金额
						  isflag:1
					  }]
				  }
				  let stoal = 0
				  let namss = []
				  let math = require('mathjs');
				  if(this.checkIdData.length>0){
					  for(let j=0;j<this.checkIdData.length;j++){
						  let arr = this.goodsInfo.restShopDisheSpecs
						  for(let i=0;i<arr.length;i++){
							  if(arr[i].speId == this.checkIdData[j]){
								  params.disheorderOrderitems[0].speId = arr[i].speId 
								  stoal = math.add(stoal,arr[i].spePrice)
							  }
						  }
						  params.disheorderOrderitems[0].speName = this.checkSpec
					  }
				  }
				  console.log("123",stoal)
				  let gosprice = math.add(stoal,this.goodsInfo.dprice)
				  let gmoney = math.multiply(this.buyNum,gosprice)
				  params.disheorderOrderitems[0].addPrice = stoal
				  params.disheorderOrderitems[0].ipayNum = gmoney
				  params.paymoney = gmoney
				  console.log("xxsss0",params)
				  cartListOdr(params).catch(resp=>{
					  this.showSkuPopup = false
					  this.orderId = resp.data.data
					  let _this = this
					  // #ifdef MP-WEIXIN
						  uni.login({
							provider: 'weixin',
							success: res => {
							  if (res.code) {
								// 获取到登录凭证code
								let code = res.code;
								// 调用后端接口，传递code进行获取openid操作
								if(_this.payWaytype==1){
									//卡支付
									let psx = {
										userId:this.userId,
										orderId:this.orderId
									}
									cardxcxPay(psx).catch(respz=>{	
										console.log("respz",respz)
										if(respz.data.code==200){
											uni.navigateTo({
												 url:'../my/order/index'
											})
										}
									})
								}else{
									uni.login({
										  provider: 'weixin',
										  success: res => {
											  if (res.code) {
												  // 获取到登录凭证code
												  let code = res.code;
												  // 调用后端接口，传递code进行获取openid操作
												  _this.getOpenid(code)  
											  }
										  }
									});
								}
							  }
							}
						  });
					  // #endif
					  // #ifndef MP-WEIXIN
						  _this.showPay = false
					  // #endif
				  })
			  }
		  },
		  getOpenid(cdos){
			  let params = {
				  code:cdos,
				  userId:this.userId
			  }
			  getwxOpenId(params).catch(resp=>{
				  console.log("666",resp)
				  let para = {
					  orderNumber:this.orderId,
					  openId:resp.data.openid
				  }
				  redayxcxPay(para).catch(resp=>{
						//调用微信官方支付接口弹出付款界面,输入密码扣款
					  wx.requestPayment({
						   timeStamp:resp.data.timeStamp,  //时间戳
						   nonceStr:resp.data.nonceStr,   //随机字符串
						   package:resp.data.package,    //prepay_id
						   signType:resp.data.signType,   //签名算法MD5
						   paySign:resp.data.paySign,    //签名
						   success (res) {
							 if (res.errMsg == "requestPayment:ok"){
								console.log('支付成功', res)
								uni.showToast({
								  title:"支付成功",
								  icon: 'none',
								  duration: 2000
								});
								_this.showPay = false
							   uni.redirectTo({
									url:'../my/order/index'
							   })
							 }else{
								uni.showToast({
								  title:"支付失败",
								  icon: 'none',
								  duration: 2000
								});
							 }
						   },
						   fail (res) { 
							 console.log('支付失败', res)
							 uni.showToast({
							   title:"已取消支付",
							   icon: 'none',
							   duration: 2000
							 });
						   }
					  })
				  })
			  })
		  },
		  // 刷新页面数据
		  onRefreshPage() {
			  const app = this
			  app.isLoading = true
			  let params = {
				  dishesId:this.dishesId,
				  userId:uni.getStorageSync("userId")
			  }
			  queryGoodsOne(params).catch(result => {
				  if(result.data.code==200){
					   app.goodsInfo = result.data.dishe
					   if(result.data.dishe.dimg){
							app.godImg = app.uploadFilePath + result.data.dishe.dimg
					   }else{
						   app.godImg = app.picUrl + 'goods.png'
					   }
				  }else{
					  uni.showToast({
						  title: result.msg,
						  icon: 'none',
						  duration: 2000
					  });
				  }
				   // app.page = pageData.page
				   app.iscollect = parseInt(app.goodsInfo.isCollect)
			  })
		  },
			/**
			 * 显示/隐藏SKU弹窗
			 * @param {skuMode} 模式 1:都显示 2:只显示购物车 3:只显示立即购买
			 */
			onShowSkuPopup(type) {
			  this.dotype = type==1?true:false
			  if(this.goodsInfo.restShopDisheSpecs.length>0){
				  const groupBy = (array, key) => {
					return array.reduce((result, currentItem) => {
					  // 使用 key 的值作为分组的键
					  const groupKey = currentItem[key];
					  // 如果 result 中不存在这个键，则创建它
					  if (!result[groupKey]) {
						result[groupKey] = [];
					  }
					  // 将当前项添加到对应的分组中
					  let obj = {
						speId:currentItem.speId,
						// speType:currentItem.speType,
						speTypeItem:currentItem.speTypeItem,
						spePrice:currentItem.spePrice,
						isflag:parseInt(currentItem.isflag)
					  }
					  result[groupKey].push(obj);
					  return result;
					}, {});
				  };
				  let spcdata = this.goodsInfo.restShopDisheSpecs
				  let tdata = groupBy(spcdata, 'speType');
				  let names = Object.keys(tdata)
				  this.specData=[]
				  for(let i=0;i<names.length;i++){
					let xx = {
					  dishesId:this.goodsInfo.dishesId,
					  speType:names[i],
					  checkVal:"",
					  detail:tdata[names[i]]
					}        
					this.specData.push(xx)
				  }
				  this.showSkuPopup = true
			  }else{
				  if(type==1){
					  this.sumMony = this.goodsInfo.dprice
					  this.showSkuPopup = true
				  }else{
					  this.goCreateOrder()
				  }
			  }
			},
	  
			// 跳转到首页
			onTargetHome() {
			  uni.switchTab({
				  url: '../index'
			  })
			},
		  /**
		   * 分享到朋友圈
		   * 本接口为 Beta 版本，暂只在 Android 平台支持，详见分享到朋友圈 (Beta)
		   * https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share-timeline.html
		   */
		  onShareTimeline() { 
			const app = this
			// 构建页面参数
			const params = app.$getShareUrlParams({
			  goodsId: app.goodsId,
			})
			return {
			  title: app.goods.goods_name,
			  path: `/pages/goods/detail?${params}`
			}
		  }
	  }
	}
  </script>
  
  <style>
	page {
	  background: #fafafa;
	}
	.spxq{width:100%;height:80rpx;line-height:80rpx;display:flex;background:#F66B71;color:#ffffff}
	.shopss{color:#F66B71;font-weight:bold;text-decoration-line: underline;line-height:60rpx}
	.spjs{padding-left:20rpx;line-height:60rpx;background:#ffffff;}
	.uni-list-cell{display:flex;justify-items: center;justify-content: space-between;margin:10px 0px}
	.gmsl{padding-left:0.5rem;height:60rpx;line-height: 60px;margin:0.5rem 0rem;font-szie:0.8rem;display:flex;align-items: center;}
  </style>
  <style lang="scss" scoped>
	  @import "detail.scss";
  </style>
  